package indi.zhifa.study2025.oa.service.user;

import indi.zhifa.study2025.oa.dao.po.GenRelUserDepEntity;
import indi.zhifa.study2025.oa.dao.po.GenRelUserPositionEntity;
import indi.zhifa.study2025.oa.dao.po.GenRelUserRoleEntity;
import indi.zhifa.study2025.oa.dao.po.GenUserEntity;
import indi.zhifa.study2025.oa.model.expose.user.dto.UpdateUserDto;
import indi.zhifa.study2025.oa.service.user.dto.ChangeStatusDto;

import java.util.List;

public interface IUserService {
    /**
     *  是否存在用户名
     */
    boolean exists(String username);
    /**
     *  保存用户数据
     */
    GenUserEntity save(GenUserEntity pUserEntity);

    GenUserEntity update(Long pId, Object pUpdateUserDto);

    GenUserEntity checkById(Long pUserId);


    List<GenRelUserRoleEntity> setRoles(Long pUserId, List<Long> roleIds);
    List<GenRelUserDepEntity> setDeps(Long pUserId, List<Long> depIds);
    List<GenRelUserPositionEntity> setPositions(Long pUserId, List<Long> positionIds);
    boolean changeStatus(Long pUserId, ChangeStatusDto pChangeStatusDto);


}
